package com.scsj.cloud.producer.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.scsj.cloud.base.enums.FormNoTypeEnum;
import com.scsj.cloud.base.rest.RestResponse;
import com.scsj.cloud.base.util.RestUtils;
import com.scsj.cloud.producer.service.DistributedService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/scsj/cloud/distributed")
@Api(value = "分布式相关")
public class DistributedController {
	
	@Autowired
	private DistributedService distributedService;
	
	@PostMapping(value = "/getDistributedId")
	@ApiOperation(value = "获取分布式ID", notes = "参数：无")
	public RestResponse getDistributedId(@RequestBody FormNoTypeEnum formNoTypeEnum) {
		String id = distributedService.getDistributedId(formNoTypeEnum);
		return RestUtils.returnSuccess(id);
	}	

	
}
